Package com.rnett.action.httpclient

Wrappers for @actions/http-client.

Types

BaseHttpClient
Link copied to clipboard
interface BaseHttpClient<out T : HttpResponse>
A minimal HTTP client, based on @actions/http-client.
BasicAuthHandler
Link copied to clipboard
data class BasicAuthHandler(username: String, password: String) : HeaderProvider
Request handler for basic auth.
BearerAuthHandler
Link copied to clipboard
data class BearerAuthHandler(token: String) : HeaderProvider
Request handler for bearer auth.
HeaderProvider
Link copied to clipboard
fun fun interface HeaderProvider : RequestHandler
An object or lambda that provides some headers.
Headers
Link copied to clipboard
interface Headers
Read-only non case sensitive HTTP headers.
HttpClient
Link copied to clipboard
typealias HttpClient = BaseHttpClient<*>

A HTTP client, based on @actions/http-client.

HttpClientBuilder
Link copied to clipboard
class HttpClientBuilder
A builder for http client configuration.
HttpClientImpl
Link copied to clipboard
class HttpClientImpl : BaseHttpClient<HttpResponse>
A HTTP client, based on @actions/http-client.
HttpResponse
Link copied to clipboard
interface HttpResponse
The response from a HTTP request.
JSTypedHttpResponse
Link copied to clipboard
class JSTypedHttpResponse<T>
A typed HTTP response.
MutableHeaders
Link copied to clipboard
interface MutableHeaders : Headers
Mutable non case sensitive HTTP headers.
PersonalAccessTokenAuthHandler
Link copied to clipboard
data class PersonalAccessTokenAuthHandler(token: String) : HeaderProvider
Request handler for personal access token auth.
RequestHandler
Link copied to clipboard
fun fun interface RequestHandler
A handler that modifies outgoing requests and optionally handles authentication on 401s.

Functions

decodeBase64
Link copied to clipboard
fun String.decodeBase64(): String
encodeBase64
Link copied to clipboard
fun String.encodeBase64(): String
githubProxyUrl
Link copied to clipboard
fun githubProxyUrl(url: String): String
Get the GitHub actions proxy URL.
HttpClient
Link copied to clipboard
inline fun HttpClient(builder: HttpClientBuilder.() -> Unit = {}): HttpClient
A HTTP client, based on @actions/http-client.
plus
Link copied to clipboard
operator fun Map<String, String>.plus(header: HeaderProvider): Map<String, String>
toMap
Link copied to clipboard
fun HeaderProvider.toMap(): Map<String, String>
use
Link copied to clipboard
inline fun <R, T : BaseHttpClient<*>> T.use(block: (T) -> R): R
Use a HTTP client, then close it in finally block.